import java.awt.Color;
import java.awt.Graphics;
import java.awt.Point;
import java.awt.Rectangle;

import me.w70.bot.Bot;
import me.w70.bot.methods.Calc;
import me.w70.bot.methods.BotGraphics;
import me.w70.bot.scripting.Script;
import me.w70.bot.wrappers.RSInterface;
import me.w70.bot.wrappers.RSInterfaces;
import me.w70.bot.wrappers.RSObject;

public class CreateAccount extends Script {
		public CreateAccount() {
		}

		@Override
		public void draw(Graphics g) {
			return;
		}

		@Override
		public String getScriptAuthor() {
			return "Apo123";
		}

		@Override
		public String getScriptCategory() {
			return "Account Creation";
		}

		@Override
		public String getScriptName() {
			return "CreateAccount";
		}

		public boolean onLoad() {
			ignoreRandoms();
			return true;
		}
		
		@Override
		public int loop() throws Exception {
			Rectangle CreateAccountInterface = new Rectangle(320, 210, 124, 10);
			Rectangle UsernameInterface = new Rectangle(222, 138, 170, 14);
			Rectangle Pass1Interface = new Rectangle(222, 183, 170, 14);
			Rectangle Pass2Interface = new Rectangle(222, 210, 170, 14);
			Rectangle Day = new Rectangle(212, 272, 20, 16);
			Rectangle Month = new Rectangle(259, 272, 72, 16);
			Rectangle Year = new Rectangle(350, 272, 40, 16);
			Rectangle Country = new Rectangle(127, 337, 220, 14);
			Rectangle Continue = new Rectangle(448, 393, 210, 14);

			Graphics g = Bot.painter.getGraphics();
			g.setColor(Color.white);
			//randomClick(CreateAccountInterface);
			Bot.painter.drawRect(g, UsernameInterface);
			Bot.painter.drawRect(g, Pass1Interface);
			Bot.painter.drawRect(g, Pass2Interface);
			Bot.painter.drawRect(g, Day);
			Bot.painter.drawRect(g, Month);
			Bot.painter.drawRect(g, Year);
			Bot.painter.drawRect(g, Country);
			Bot.painter.drawRect(g, Continue);
			return 0; }

		public void randomClick(Rectangle r) {
			clickMouse((int) random(r.getMinX(), r.getMaxX() - 10), (int) random(r.getMinY(), r.getMaxY()), true);
		}
		
		@Override
		public String getScriptDescription() {
			return "Create an account.";
		}

}